define({ "api": [
  {
    "type": "delete",
    "url": "/authorizations/current",
    "title": "3. 删除当前token (delete current token)",
    "description": "<p>删除当前token (delete current token)</p>",
    "group": "Auth",
    "permission": [
      {
        "name": "jwt"
      }
    ],
    "version": "0.1.0",
    "header": {
      "examples": [
        {
          "title": "Header-Example:",
          "content": "{\n    \"Accept\": \"application/vnd.koukouloong.v1+json\"\n}",
          "type": "json"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 200 OK\n {\n     \"code\": 200,\n     \"message\": \"刷新token成功\",\n     \"data\": []\n }",
          "type": "json"
        }
      ]
    },
    "filename": "app/Http/Controllers/Api/V1/AuthController.php",
    "groupTitle": "Auth",
    "name": "DeleteAuthorizationsCurrent"
  },
  {
    "type": "get",
    "url": "/authorizations/logout",
    "title": "4. 退出登录 (logout)",
    "description": "<p>退出登录 (logout)</p>",
    "group": "Auth",
    "permission": [
      {
        "name": "jwt"
      }
    ],
    "version": "0.1.0",
    "header": {
      "examples": [
        {
          "title": "Header-Example:",
          "content": "{\n    \"Accept\": \"application/vnd.argo.v1+json\",\n    \"Authorization\": \"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vdGVzdC5hcGkua291a291bG9vbmcuY29tL2F1dGhvcml6YXRpb25zIiwiaWF0IjoxNDg2NTI0MzgyLCJleHAiOjE0ODY3NDAzODIsIm5iZiI6MTQ4NjUyNDM4MiwianRpIjoiYjhYcEhuYndBeWVDeWIzZyIsInN1YiI6MTJ9.p3553WGzqnQCbO5MhZP4wgnyiNgb1MGJMP9Yelso-TE\"\n}",
          "type": "json"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 200 OK\n {\n     \"code\": 200,\n     \"message\": \"退出登录成功\",\n     \"data\": []\n }",
          "type": "json"
        }
      ]
    },
    "filename": "app/Http/Controllers/Api/V1/AuthController.php",
    "groupTitle": "Auth",
    "name": "GetAuthorizationsLogout"
  },
  {
    "type": "post",
    "url": "/authorizations",
    "title": "1. 登录（创建一个token create a token)",
    "description": "<p>登录（创建一个token create a token)</p>",
    "group": "Auth",
    "permission": [
      {
        "name": "none"
      }
    ],
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "size": "..11",
            "optional": false,
            "field": "mobile",
            "description": "<p>手机号码</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "size": "6..20",
            "optional": false,
            "field": "password",
            "description": "<p>密码</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "size": "1,2",
            "optional": false,
            "field": "platform",
            "description": "<p>平台：1 Android，2 iOS</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "size": "1..50",
            "optional": false,
            "field": "device_type",
            "description": "<p>设备具体类型 eg：iPhone 6 plus, Mi 5 plus</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "size": "1..200",
            "optional": false,
            "field": "device_id",
            "description": "<p>设备唯一id eg：861206031257240</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "size": "1..20",
            "optional": false,
            "field": "system_version",
            "description": "<p>系统版本 eg：6.0，10.1.1</p>"
          }
        ]
      }
    },
    "version": "0.1.0",
    "header": {
      "examples": [
        {
          "title": "Header-Example:",
          "content": "{\n    \"Accept\": \"application/vnd.argo.v1+json\"\n}",
          "type": "json"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 200 OK\n{\n    \"code\": 200,\n    \"message\": \"登录成功\",\n    \"data\": {\n        \"id\": 10000,\n        \"mobile\": \"18511891205\",\n        \"nickname\": \"wahaha\",\n        \"avatar\": null,\n        \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vdGVzdC5hcGkua291a291bG9vbmcuY29tL2F1dGhvcml6YXRpb25zIiwiaWF0IjoxNDg3MjI4MzE1LCJleHAiOjE0ODc0NDQzMTUsIm5iZiI6MTQ4NzIyODMxNSwianRpIjoiRVJaU3dqRmZOTmp6UzlrRSIsInN1YiI6MTAwMDB9.Kqey90ADZ2Cyko07E4T2qgOKiMbydOUtz_SmwX9sD7E\",\n        \"expired_at\": \"2017-02-18 18:58:35\",\n        \"refresh_expired_at\": \"2017-03-02 06:58:35\"\n    }\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP/1.1 200 OK\n{\n    \"code\": 20005,\n    \"message\": \"密码格式不正确\"\n    \"data\": []\n}",
          "type": "json"
        }
      ]
    },
    "filename": "app/Http/Controllers/Api/V1/AuthController.php",
    "groupTitle": "Auth",
    "name": "PostAuthorizations"
  },
  {
    "type": "put",
    "url": "/authorizations/current",
    "title": "2. 刷新token(refresh token)",
    "description": "<p>刷新token(refresh token) 客户端用户登录成功后会得到 token 的两个有效期：expired_at 和 refresh_expired_at，客户端根据这个过期时间调用刷新token接口，或者在请求结果为401的时候调用刷新token接口</p>",
    "group": "Auth",
    "permission": [
      {
        "name": "JWT"
      }
    ],
    "version": "0.1.0",
    "header": {
      "fields": {
        "Header": [
          {
            "group": "Header",
            "type": "String",
            "optional": false,
            "field": "Authorization",
            "description": "<p>用户旧的jwt-token, value以Bearer开头</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Header-Example:",
          "content": "{\n     \"Accept\": \"application/vnd.argo.v1+json\",\n     \"Authorization\": \"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vdGVzdC5hcGkua291a291bG9vbmcuY29tL2F1dGhvcml6YXRpb25zIiwiaWF0IjoxNDg2NTI0MzgyLCJleHAiOjE0ODY3NDAzODIsIm5iZiI6MTQ4NjUyNDM4MiwianRpIjoiYjhYcEhuYndBeWVDeWIzZyIsInN1YiI6MTJ9.p3553WGzqnQCbO5MhZP4wgnyiNgb1MGJMP9Yelso-TE\"\n}",
          "type": "json"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 200 OK\n{\n    \"code\": 200,\n    \"message\": \"刷新token成功\",\n    \"data\": {\n        \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vdGVzdC5hcGkua291a291bG9vbmcuY29tL2F1dGhvcml6YXRpb25zL2N1cnJlbnQiLCJpYXQiOjE0ODY1MjQzODIsImV4cCI6MTQ4Njc0MDY5MSwibmJmIjoxNDg2NTI0NjkxLCJqdGkiOiJleUdtUWRtNm1FbFFsbjNuIiwic3ViIjoxMn0.KdzAKHHkTwGtA6TEq-YvBA0t1YHmx8zj1EsjvihAGyQ\",\n        \"expired_at\": \"2017-02-10 15:31:31\",\n        \"refresh_expired_at\": \"2017-02-22 03:31:31\"\n    }\n}",
          "type": "json"
        }
      ]
    },
    "filename": "app/Http/Controllers/Api/V1/AuthController.php",
    "groupTitle": "Auth",
    "name": "PutAuthorizationsCurrent"
  },
  {
    "type": "get",
    "url": "/user",
    "title": "6. 当前用户信息(current user info)",
    "description": "<p>当前用户信息(current user info)</p>",
    "group": "user",
    "permission": [
      {
        "name": "JWT"
      }
    ],
    "version": "0.1.0",
    "header": {
      "examples": [
        {
          "title": "Header-Example:",
          "content": "{\n     \"Accept\": \"application/vnd.argo.v1+json\",\n     \"Authorization\": \"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vdGVzdC5hcGkua291a291bG9vbmcuY29tL2F1dGhvcml6YXRpb25zL2N1cnJlbnQiLCJpYXQiOjE0ODY1MjQzODIsImV4cCI6MTQ4Njc0MjA4MSwibmJmIjoxNDg2NTI2MDgxLCJqdGkiOiJWM2RaTmtWOExTY1BOYVVyIiwic3ViIjoxMn0.b2j4wwNxQ5AZd8hJ1KAgyci3OnOJZgOeisltESHCPtE\"\n}",
          "type": "json"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 200 OK\n{\n    \"code\": \"200\",\n    \"message\": \"获取用户信息成功\",\n    \"data\": {\n        \"id\": 12,\n        \"mobile\": \"13812345678\",\n        \"nickname\": \"wahaha\",\n        \"avatar\": \"uploads/avatars/12_1486548562751287_b4dd4302-99af-4da6-a7ea-f0163178ba54.jpg\"\n    }\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP/1.1 200 OK\n{\n     \"code\": 20701,\n     \"message\": \"获取用户信息失败\",\n     \"data\": []\n}",
          "type": "json"
        }
      ]
    },
    "filename": "app/Http/Controllers/Api/V1/UserController.php",
    "groupTitle": "user",
    "name": "GetUser"
  },
  {
    "type": "patch",
    "url": "/user",
    "title": "4. 修改个人信息(update my info)",
    "description": "<p>修改个人信息(update my info)</p> <p>修改那个字段就传递那个字段</p> <p>注意：PATCH 和 PUT 方法均需设置 Content-Type：application/x-www-form-urlencoded</p>",
    "group": "user",
    "permission": [
      {
        "name": "JWT"
      }
    ],
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "size": "2..4",
            "optional": true,
            "field": "nickname",
            "description": "<p>昵称</p>"
          }
        ]
      }
    },
    "header": {
      "examples": [
        {
          "title": "Header-Example:",
          "content": "{\n     \"Accept\": \"application/vnd.argo.v1+json\",\n     \"Authorization\": \"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vdGVzdC5hcGkua291a291bG9vbmcuY29tL2F1dGhvcml6YXRpb25zL2N1cnJlbnQiLCJpYXQiOjE0ODY1MjQzODIsImV4cCI6MTQ4Njc0MjA4MSwibmJmIjoxNDg2NTI2MDgxLCJqdGkiOiJWM2RaTmtWOExTY1BOYVVyIiwic3ViIjoxMn0.b2j4wwNxQ5AZd8hJ1KAgyci3OnOJZgOeisltESHCPtE\"\n}",
          "type": "json"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 200 OK\n {\n     \"code\": 200,\n     \"message\": \"修改成功\",\n     \"data\": []\n }",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP/1.1 200 OK\n {\n     \"code\": 20403,\n     \"message\": \"性别必须是一个数字\",\n     \"data\": []\n }",
          "type": "json"
        }
      ]
    },
    "filename": "app/Http/Controllers/Api/V1/UserController.php",
    "groupTitle": "user",
    "name": "PatchUser"
  },
  {
    "type": "post",
    "url": "/requestVerifyCode",
    "title": "1. 请求验证码(requestVerifyCode)",
    "description": "<p>请求验证码(requestVerifyCode)。验证码有效期5分钟。</p>",
    "group": "user",
    "permission": [
      {
        "name": "none"
      }
    ],
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "size": "..11",
            "optional": false,
            "field": "mobile",
            "description": "<p>手机号码[unique]</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "allowedValues": [
              "1",
              "2"
            ],
            "optional": false,
            "field": "type",
            "description": "<p>请求验证码类型：1 用户注册，2 找回密码</p>"
          }
        ]
      }
    },
    "header": {
      "examples": [
        {
          "title": "Header-Example:",
          "content": "{\n    \"Accept\": \"application/vnd.argo.v1+json\"\n}",
          "type": "json"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 200 OK\n {\n     \"code\": 200,\n     \"message\": \"验证码发送成功\",\n     \"data\": []\n }",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP/1.1 200 OK\n{\n     \"code\": 20101,\n     \"message\": \"手机号码不能为空\",\n     \"data\": []\n}",
          "type": "json"
        }
      ]
    },
    "filename": "app/Http/Controllers/Api/V1/UserController.php",
    "groupTitle": "user",
    "name": "PostRequestverifycode"
  },
  {
    "type": "post",
    "url": "/resetPassword",
    "title": "5. 找回密码(reset password)",
    "description": "<p>找回密码(reset password)</p>",
    "group": "user",
    "permission": [
      {
        "name": "none"
      }
    ],
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "Number",
            "size": "..11",
            "optional": false,
            "field": "mobile",
            "description": "<p>手机号码[unique]</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "size": "6..20",
            "optional": false,
            "field": "password",
            "description": "<p>密码</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "size": "..6",
            "optional": false,
            "field": "code",
            "description": "<p>验证码</p>"
          }
        ]
      }
    },
    "header": {
      "examples": [
        {
          "title": "Header-Example:",
          "content": "{\n    \"Accept\": \"application/vnd.argo.v1+json\"\n}",
          "type": "json"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 200 OK\n {\n     \"code\": 200,\n     \"message\": \"重置密码成功\",\n     \"data\": []\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP/1.1 200 OK\n{\n     \"code\": 20611,\n     \"message\": \"验证码错误\",\n     \"data\": []\n}",
          "type": "json"
        }
      ]
    },
    "filename": "app/Http/Controllers/Api/V1/UserController.php",
    "groupTitle": "user",
    "name": "PostResetpassword"
  },
  {
    "type": "post",
    "url": "/uploadAvatar",
    "title": "3. 上传头像(upload user avatar)",
    "description": "<p>上传头像(upload user avatar) 客户端按常规的上传图片处理即可，Content-Disposition: form-data; 头像文件名称：avatar</p>",
    "group": "user",
    "permission": [
      {
        "name": "jwt"
      }
    ],
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "avatar",
            "description": "<p>头像名称</p>"
          }
        ]
      }
    },
    "header": {
      "examples": [
        {
          "title": "Header-Example:",
          "content": "{\n     \"Accept\": \"application/vnd.argo.v1+json\",\n     \"Authorization\": \"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vdGVzdC5hcGkua291a291bG9vbmcuY29tL2F1dGhvcml6YXRpb25zL2N1cnJlbnQiLCJpYXQiOjE0ODY1MjQzODIsImV4cCI6MTQ4Njc0MjA4MSwibmJmIjoxNDg2NTI2MDgxLCJqdGkiOiJWM2RaTmtWOExTY1BOYVVyIiwic3ViIjoxMn0.b2j4wwNxQ5AZd8hJ1KAgyci3OnOJZgOeisltESHCPtE\"\n}",
          "type": "json"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 200 OK\n {\n     \"code\": 200,\n     \"message\": \"头像上传成功\",\n     \"data\": {\n         \"id\": 10000,\n         \"mobile\": \"18511891205\",\n         \"nickname\": \"wahaha\",\n         \"avatar\": \"uploads/avatars/10000_1487238303_7008cee7-91e2-4cc9-8585-2aa03ccb461e.jpg\"\n     }\n }",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP/1.1 200 OK\n{\n     \"code\": 20301,\n     \"message\": \"头像上传失败\"\n     \"data\": []\n}",
          "type": "json"
        }
      ]
    },
    "filename": "app/Http/Controllers/Api/V1/UserController.php",
    "groupTitle": "user",
    "name": "PostUploadavatar"
  }
] });
